import java.util.HashSet;
import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        int[] array = {1,2,3,3,2};
        TreeSet<Integer> set = new TreeSet<>();
        for (int i = 0; i < array.length; i++) {
            set.add(array[i]);
        }
        System.out.println(set);
    }
}
